#ifndef TEMP_H
#define TEMP_H

#include "stm32l0xx.h"
#include "delay.h"

#define TEMP_DATA_GPIO_TYPE  	GPIOA
#define TEMP_DATA_GPIO_PIN		GPIO_PIN_0
#define TEMP_SWITCH_GPIO_TYPE	GPIOB
#define TEMP_SWITCH_GPIO_PIN	GPIO_PIN_12


void temp_init(void);

unsigned char DS18B20_init(void);

unsigned char DS18B20_Write_Byte(unsigned char val);

unsigned char DS18B20_Read_Bit(void);

unsigned char DS18B20_Read_Byte(void);

float DS18B20_Get_Temp(void);


#endif





